#ifndef __VIEWMANAGER__
#define __VIEWMANAGER__

#include "Header.h"
#include "View.h"

template <class T>
class ViewManager
{
public:
	static ViewManager* getInstance()
	{
		return m_pInstance;
	}
	void createView(bool fullscreen, char* title, __UINT32 width, __UINT32 height)
	{
		if (!m_pInstance)
			m_pInstance = new ViewManager;
		m_pInstance->m_pView = new View(fullscreen, width, height, title);
	}
	~ViewManager();
	T* getView() { return m_pView; }
protected:
	ViewManager::ViewManager() : m_pView(0) {}
	static ViewManager* m_pInstance;
	T* m_pView;
};

#endif